<?php

namespace app\admin\model;

use think\Model;


class TeacherArea extends Model
{

    

    

    // 表名
    protected $name = 'teacher_area';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];
    

    

    public static function get_arr(){
        $arr = TeacherArea::column('name','id');
        return $arr;
    }
    public static function get_id_arr(){
        $arr = TeacherArea::column('name','id');
        $data = [];
        $asd = 0;
        foreach ($arr as $k=>$v){
            $data[$asd]['id'] = $k;
            $data[$asd]['name'] = $v;
            $asd++;
        }
        return $data;
    }




}
